@namespace BulmaRazor.Components
@inherits BulmaComponentBase

@if (Equals(Size, Size.Size1))
{
    <h1 @attributes="Attributes" class="@classes">@ChildContent</h1>
}
else if (Equals(Size, Size.Size2))
{
    <h2 @attributes="Attributes" class="@classes">@ChildContent</h2>
}
else if (Equals(Size, Size.Size3))
{
    <h3 @attributes="Attributes" class="@classes">@ChildContent</h3>
}
else if (Equals(Size, Size.Size4))
{
    <h4 @attributes="Attributes" class="@classes">@ChildContent</h4>
}
else if (Equals(Size, Size.Size5))
{
    <h5 @attributes="Attributes" class="@classes">@ChildContent</h5>
}
else if (Equals(Size, Size.Size6))
{
    <h6 @attributes="Attributes" class="@classes">@ChildContent</h6>
}

@code {

    string classes => CssBuilder.Default("subtitle")
        .AddClassFromAttributes(Attributes)
        .AddClass(Size.Value, Size.Value)
        .AddClass("is-spaced", IsSpaced)
        .Build();

    /// <summary>
    /// 大小
    /// </summary>
    [Parameter]
    public Size Size { get; set; } = Size.Size5;

    /// <summary>
    /// 间距
    /// </summary>
    [Parameter]
    public bool IsSpaced { get; set; }

    /// <summary>
    /// 子内容
    /// </summary>
    [Parameter]
    public RenderFragment ChildContent { get; set; }

}